package util;

import core.Named;

/**
 * Named sets are name sets with names
 * 
 * The purpose of this class is act as a special hash.  For instance,
 * you can have a NameSet of NamedSets which would be akin to havin
 * a hash of Strings to Sets.
 * 
 * @author Alexander Schearer <aas11@duke.edu>
 *
 * @param <T>
 */
public class NamedSet<E extends Named> extends NameSet<E> implements Named<NamedSet> {
	
	private String myName;
	
	public NamedSet(String name)
	{
		super();
		myName = name;
	}

	public String getName() {
		return myName;
	}

	public boolean equals(NamedSet i) {
		return myName.equals(i.getName());
	}

	public int compareTo(NamedSet o) {
		return myName.compareTo(o.getName());
	}

}
